import { axios } from '@/utils/request'

//查询所有角色
export function selectAllRole() {
  return axios({
    url: '/pc/role/selectAll',
    method: 'get'
  })
}

export function selectPage(parameter) {
  return axios({
    url: '/pc/role/selectPage/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function selectRoleIdByUserId(parameter) {
  return axios({
    url: '/pc/role/selectRoleIdByUserId/'+parameter,
    method: 'get'
  })
}

export function save(parameter) {
  return axios({
    url: '/pc/role/save',
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/pc/role/delete/' + parameter,
    method: 'get'
  })
}